cmake_minimum_required(VERSION 3.10)
set(ROOT_PATH /home/psdz/diskc/yantao/awork/zywy/icr/poc/radarlab)
option(NEED_TO_OPEN_CUDA "need to support cuda or not" ON)

option(SUPPORT_DYNAMIC_LIBRARY "Support dynamic library or not" OFF)
set(OPTIMIZE_LEVEL "O0")

project(era)

set(DEVICE_NAME "AIE2EInfer")
# 链接zy_icr库
set(ZY_ICR_LIB_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/include")
# set(MY_LIB_LIBRARIES "/path/to/build/my_lib.lib") # Windows
# Linux/macOS
set(ZY_ICR_LIB_LIBRARIES "${CMAKE_SOURCE_DIR}/lib/libzy_icr.a")
# ZMQ
# find_package(zmq REQUIRED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(ZMQ REQUIRED libzmq)
include_directories(${ZMQ_INCLUDE_DIRS})
# target_link_libraries(data_source ${ZMQ_LIBRARIES})

include(${CMAKE_SOURCE_DIR}/cmake/common.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/algorithm.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/preBuild.cmake)

include_directories(${ROOT_PATH}/headers)
set(SRC_FILES main.cpp AppDelegate.h AppDelegate.cpp GlobalParameters.h)

add_subdirs()
get_all_targets(all_targets)
add_executable(${DEVICE_NAME} ${SRC_FILES})
target_link_libraries(${DEVICE_NAME} ${all_targets} ${MIDDLEWARE_LIB_NAME} ${ZY_ICR_LIB_LIBRARIES} ${ZMQ_LIBRARIES})

include(${CMAKE_SOURCE_DIR}/cmake/algorithmLib.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/postBuild.cmake)
